package com.java65;

import java.util.Scanner;

public class homework1 {
    public static void main(String[] args) {
        for (int j = 1; j <=3; j++) {
            System.out.println("输入第" + j + "个班的学生成绩");
            int score = 0;
            int sum = 0;
            double avg = 0;
            int max = 0;
            int min = 0;
            for (int i = 1; i <= 5; i++) {
                Scanner input = new Scanner(System.in);
                System.out.println("输入学生成绩第" + i + "个学生的成绩");
                score = input.nextInt();
                if (i == 1) {
                    min = score;
                }
                if (score < min) {
                    min = score;
                }
                if (score > max) {
                    max = score;
                }
                sum = sum + score;
                avg = sum / 5;
            }
            System.out.println("avg:" + avg);
            System.out.println("max:" + max);
            System.out.println("min:" + min);
        }
    }
}
